From 98b23dd14f67bc019501d8d184a33fb7660aa8bc Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 14 Mar 2006 15:40:44 +0100 Subject: [PATCH] Fix the bug that hvm domain network breaks after xm reboot. Root cause: qemu network related info is not saved in xenstore, so after reboot, this information is missing, and qemu can not start network. Signed-off-by: Haifeng Xue --- tools/python/xen/xend/server/netif.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/python/xen/xend/server/netif.py b/tools/python/xen/xend/server/netif.py index ebb7212534..028bbf3989 100644 --- a/tools/python/xen/xend/server/netif.py +++ b/tools/python/xen/xend/server/netif.py @@ -72,8 +72,6 @@ class NetifController(DevController): sxp.child_value(config, 'script', xroot.get_vif_script())) typ = sxp.child_value(config, 'type') - if typ == 'ioemu': - return (None,{},{}) bridge = sxp.child_value(config, 'bridge') mac = sxp.child_value(config, 'mac') vifname = sxp.child_value(config, 'vifname') @@ -87,6 +85,13 @@ class NetifController(DevController): back = { 'script' : script, 'mac' : mac, 'handle' : "%i" % devid } + + if typ == 'ioemu': + front = {} + back['type'] = 'ioemu' + else: + front = { 'handle' : "%i" % devid, + 'mac' : mac } if ipaddr: back['ip'] = ' '.join(ipaddr) if bridge: @@ -94,9 +99,6 @@ class NetifController(DevController): if vifname: back['vifname'] = vifname - front = { 'handle' : "%i" % devid, - 'mac' : mac } - return (devid, back, front) -- 2.30.2